<?php
/**
 * Created by XM·Tan.
 * Motto: Who shuts love out, in turn shall be shut out from love.
 * Date: 2021/4/18 17:02
 */

namespace app\admin\business;


use app\common\business\BusBase;
use app\common\model\mysql\Setting as SettingModel;
use think\facade\Log;

class Setting extends BusBase {

    public $model = null;

    public function __construct() {
        $this->model = new SettingModel();
    }

    /**
     * 更新逻辑
     * @param $data
     * @return bool|int
     */
    public function updateData($data) {
        try {
            $id = $this->edit($data['id'],$data);
            if (!$id) {
                return $id;
            }
            return true;
        } catch (\Exception $e) {
            Log::error('common-business-Setting-updateData: ' . $e->getMessage());
            return false;
        }
    }

}